#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
using namespace std;
const double PI=acos(-1.0);
const int MAXN=10050;
int n,f;
double A[MAXN];
bool check(double a){
	int sum=0;
	for(int i=0;i<n;i++){
		sum+=floor(A[i]/a);
	}
	return sum>=f+1;
}
int main(void){
	int t;
	scanf("%d",&t);
	while(t--){
		scanf("%d%d",&n,&f);
		int ri;
		double maxA=-1;
		for(int i=0;i<n;i++){
			scanf("%d",&ri);
			A[i]=PI*ri*ri;
			maxA=max(maxA,A[i]);
		}
		double l=0,r=maxA;
		while(r-l>1e-5){
			double m=(l+r)/2;
			if(check(m)){
				l=m;
			}
			else{
				r=m;
			}
		}
		printf("%.4lf\n",l);
	}
}
